-- @owner: cr13
-- @date: 2023-05-11
-- @testpoint: opengauss关键字algorithm(非保留)，作为函数名，合理报错

--step1:关键字不带引号 expect:成功
drop function if exists algorithm;
create function algorithm(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/

--step2:关键字带双引号 expect:成功
drop function if exists "algorithm";
create function "algorithm"(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/

--step3:关键字带单引号 expect:合理报错
drop function if exists 'algorithm';
create function 'algorithm'(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/

--step4:关键字带反引号 expect:合理报错
drop function if exists `algorithm`;
create function `algorithm`(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/

--step5:清理环境 expect:成功
drop function if exists algorithm;